
function User(){
    var id;
    var nome;
    var email;
    var matricula;
    var username;
    var password;
    var roles = [];

    this.getId = function() {
        return id;
    }

    this.setId = function(value) {
        id = value;
    }

    this.getEmail = function() {
        return email;
    }

    this.setEmail = function(value) {
        email = value;
    }

    this.getNome = function() {
        return nome;
    }

    this.setNome = function(value) {
        nome = value;
    }

    this.getMatricula = function() {
        return matricula;
    }

    this.setMatricula = function(value) {
        matricula = value;
    }

    this.setUsername = function(value) {
         username = value;
    }

    this.getUsername = function() {
        return username;
    }

    this.getPassword = function() {
        return password;
    }

    this.setPassword = function(value) {
        password = value;
    }

    this.addRole = function(role) {
        roles.push(role);
    }

    this.removeRole = function(value) {
        roles.splice(roles.indexOf(value),1);
    }

    this.getRoles = function() {
        return roles;
    }

    this.setRoles = function(value) {
        roles = value;
    }
}

module.exports = User;
